const storage = {
  setItem(key,value){
    if(typeof value == 'object'){
      sessionStorage.setItem(key,JSON.stringify(value))
    }else{
      sessionStorage.setItem(key,value)
    }
  },
  getItem(key){
    return JSON.parse(sessionStorage.getItem(key))
  },
  removeItem(key){
    sessionStorage.removeItem(key)
  }
}

export default storage
